package com.jt.demo1;

import com.jt.demo1.config.SpringConfig;
import com.jt.demo1.proxy.JDKProxy;
import com.jt.demo1.server.UserServer;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class SpringTx {
    public static void main(String[] args) {
        ApplicationContext context=
                new AnnotationConfigApplicationContext(SpringConfig.class);
        UserServer userServer = context.getBean(UserServer.class);
UserServer proxy= (UserServer) JDKProxy.getProxy(userServer);
        System.out.println(proxy);
        // userServer.addUser();
        // userServer.deleteUser();
//        proxy.deleteUser();
    }
}
